﻿<%@ page language="java" 
	contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../styles/login.css" />
<script type="text/javascript" src="../jquery/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#login").click(function() {
			$("#login_form").submit(); 
			/* alert("Submitted"); */
		});
		$("#regist_button").click(function() {
			 $("#reg_form").submit();  
			 /* alert("reg.action");  */
		});
	});
</script>
</head>
<body>
	<div class="global">	
		<form name="login_form" id="login_form" action="login.action" method="post">
			<div class="log log_in" tabindex='-1' id='dl'>
				<dl>
					<dt>
						<div class='header'>
							<h3>登&nbsp;录</h3>
						</div>
					</dt>
					
                     
					<dt>
						<div class='letter'>
							用户名:&nbsp;<input type="text" name="id" id="count" tabindex='1' />
						</div>
					</dt>
					<dt>
						<div class='letter'>
							密&nbsp;&nbsp;&nbsp;码:&nbsp;<input type="password" name="password"
								id="password" tabindex='2' />
						</div>
					</dt>
					<dt>
						<div>
							<input type="button" name="login_bt" id="login" value='&nbsp登&nbsp录&nbsp'
								tabindex='3' /> <input type="button" name="" id="sig_in"
								value='&nbsp注&nbsp册&nbsp' tabindex='4' />
						</div>
					</dt>
				</dl>
			</div>
		</form>
		<form id="reg_form" action="reg.action" method="post">
			<div class="sig sig_out" tabindex='-1' id='zc'
				style='visibility: hidden;'>
				<dl>
					<dt>
						<div class='header'>
							<h3>注&nbsp;册</h3>
						</div>
					</dt>
					<dt></dt>
					<dt>
						<div class='letter'>
							身份证号:&nbsp;<input type="text" name="id" id="regist_username"
								tabindex='18' /><!-- 5 -->
							<div class='warning' id='warning_1'>
								<span>该身份证号不可用</span>
							</div>
						</div>
					</dt>
					<dt>
						<div class='letter'>
							&nbsp;&nbsp;&nbsp;手机号:&nbsp;<input type="text" name="phonenumber" id=""
								tabindex='11' />

						</div>
					</dt>
					 <dt>
						<div class='letter'>
							&nbsp;&nbsp;&nbsp;昵&nbsp;&nbsp;&nbsp;称:&nbsp;<input type="text" name="name"
								id="nickname" tabindex='6' />
						</div>
					</dt> 
					<dt>
						<div class='letter'>
							&nbsp;&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;码:&nbsp;<input type="password" name="password"
								id="regist_password" tabindex='7' />
							<div class='warning' id='warning_2'>
								<span>密码长度过短</span>
							</div>
						</div>
					</dt>
					<dt>
						<div class='password'>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确认密码:&nbsp;<input type="password" name=""
								id="final_password" tabindex='8' />
							<div class='warning' id='warning_3'>
								<span>密码输入不一致</span>
							</div>
						</div>
					</dt>
					<dt>
						<div>
							<input type="button" name="" id="regist_button"
								value='&nbsp注&nbsp册&nbsp' tabindex='9' /> <input type="button"
								name="" id="back" value='&nbsp返&nbsp回&nbsp' tabindex='10' />
							<script type="text/javascript">
								function get(e) {
									return document.getElementById(e);
								}
								get('sig_in').onclick = function() {
									get('dl').className = 'log log_out';
									get('zc').className = 'sig sig_in';
								}
								get('back').onclick = function() {
									get('zc').className = 'sig sig_out';
									get('dl').className = 'log log_in';
								}
								window.onload = function() {
									var t = setTimeout(
											"get('zc').style.visibility='visible'",
											800);
									get('final_password').onblur = function() {
										var npassword = get('regist_password').value;
										var fpassword = get('final_password').value;
										if (npassword != fpassword) {
											get('warning_3').style.display = 'block';
										}
									}
									get('regist_password').onblur = function() {
										var npassword = get('regist_password').value.length;
										if (npassword<6&&npassword>0) {
											get('warning_2').style.display = 'block';
										}
									}
									get('regist_password').onfocus = function() {
										get('warning_2').style.display = 'none';
									}
									get('final_password').onfocus = function() {
										get('warning_3').style.display = 'none';
									}
								}
							</script>
						</div>
					</dt>
				</dl>
			</div>
		</form>
	</div>
</body>
</html>